package cn.com.pingtech.slave.controller;

import cn.com.pingtech.slave.domain.SlaveModel;
import cn.com.pingtech.slave.service.SlaveService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author zhusy
 * @description MasterController
 * @date 2021/1/7 17:10
 */
@RestController
@RequestMapping("/slave")
public class SlaveController {
    @Autowired
    SlaveService masterService;

    @GetMapping("/list")
    public List<SlaveModel> list() {
        return masterService.list();
    }
}
